package com.eveinfo.api.character.skillqueue;

import java.io.Serializable;
import java.util.Date;

public class ApiSkillQueue implements Serializable{
	
	private static final long serialVersionUID = 5161258597738177193L;
	
	private Date trainingEndTime;
	private Date trainingStartTime;
	private int trainingTypeID;
	private int trainingStartSP;
	private int trainingDestinationSP;
	private int trainingToLevel;
	private int position;

	
	private Date getTrainingEndDate() {
		return trainingEndTime;
	}

	public void setTrainingEndTime(Date trainingEndTime) {
		this.trainingEndTime = trainingEndTime;
	}

	private Date getTrainingStartDate(){
		return trainingStartTime;
	}

	public void setTrainingStartTime(Date trainingStartTime) {
		this.trainingStartTime = trainingStartTime;
	}

	public int getTrainingTypeID() {
		return trainingTypeID;
	}

	public void setTrainingTypeID(int trainingTypeID) {
		this.trainingTypeID = trainingTypeID;
	}

	public int getTrainingStartSP() {
		return trainingStartSP;
	}

	public void setTrainingStartSP(int trainingStartSP) {
		this.trainingStartSP = trainingStartSP;
	}

	public int getTrainingDestinationSP() {
		return trainingDestinationSP;
	}

	public void setTrainingDestinationSP(int trainingDestinationSP) {
		this.trainingDestinationSP = trainingDestinationSP;
	}

	public int getTrainingToLevel() {
		return trainingToLevel;
	}

	public void setTrainingToLevel(int trainingToLevel) {
		this.trainingToLevel = trainingToLevel;
	}

	public long getRemainTime() {
		Date trainingEndDate = getTrainingEndDate();
		Date trainingStartDate = getTrainingStartDate();
		if(!(trainingEndDate != null && trainingStartDate != null)){
			return 0;
		}
		long endTime = trainingEndDate.getTime();
		long currentTime = trainingStartDate.getTime();
		
		return endTime - currentTime;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public int getPosition() {
		return position;
	}
}
